package saxion.sensorframework.structuur;

import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAccessType;

/**
 * The DataStructure used by the sensor class to define wich fields the sensor
 * has.<br>
 * Classes can be used for converting xml document to DataStruc object
 * 
 * @author Erik & Martijn
 * 
 */
@XmlRootElement(name = "datastruc")
@XmlAccessorType(XmlAccessType.FIELD)
public class DataStruc {

	private String name;
	private String type;

	public DataStruc() {

	}

	/**
	 * Get the name of the DataStruc
	 * 
	 * @return
	 */
	public String getName() {
		return this.name;
	}

	/**
	 * Get the type of the DataStruc
	 * 
	 * @return
	 */
	public String getType() {
		return this.type;
	}

	/**
	 * Sets the name of the DataStruc
	 * 
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * Set the type of the DataStruc The following types can be used -string
	 * -boolean -double -datetime
	 * 
	 * @param type
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * Returns the fields of the DataStruc class as a String
	 */
	public String toString() {
		return "name: " + this.name + "; type: " + this.type;
	}
}
